Repository navigation
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
80299be to
b6414df
Compare
|
Rebased onto latest litellm_internal_staging and dropped the constants.py comment Greptile flagged. Also pinned the outgoing chat request contract in the provider tests. @greptileai |
|
@AJ-ing what else is left to get this reviewed and merged? |
b6414df to
907d359
Compare
|
@onkarbpatil Just rebased onto latest litellm_internal_staging again (ahead 7 / behind 0). What's left for merge is maintainer review. I don't have merge access. Status:
@mateo-berri when you have a minute, this one and the docs PR are ready for a look |
|
@AJ-ing @mateo-berri any update on review? |
|
@onkarbpatil No new code changes. Branch is current with staging, Greptile 5/5. Still needs @mateo-berri review; docs companion is BerriAI/litellm-docs#905. |
|
@mateo-berri @ryan-crabbe-berri @yuneng-berri @kerry-berri |
907d359 to
64be726
Compare
|
@onkarbpatil @chongyihu Rebased onto latest |
|
Pushed 7d016c9: catalog unit test now checks backup agreement and positive rates instead of pinning vendor $/token (Greptile P2). Remaining red checks look like main noise, not OpenInfer: |
|
Hi @AJ-ing , seems like there are still upstream CI issues. Is the upstream resolved? If it is resolved, can you hep us rebase and rerun the CI test? If it is not, is it possible that you guys can manually approve and merge the openinfer integration? It would be very helpful! |
7d016c9 to
ed7917d
Compare
|
@chongyihu Rebased onto latest main (tip ed7917d). OpenInfer unit tests still 12/12. CI should re-run now; mergeability should clear once checks finish. |
|
@greptileai Rebased onto latest main. Please re-review the tip. |
Register OpenInfer in the JSON provider registry with catalog models, proxy create fields, and unit coverage so requests route via openinfer/ Co-authored-by: Cursor <cursoragent@cursor.com>
Pinning per-token prices made CI fail when the vendor list changed. Keep the backup agreement and positivity checks our code owns. Co-authored-by: Cursor <cursoragent@cursor.com>
ed7917d to
2b67e89
Compare
|
@kerry-berri Rebased onto latest main (tip 2b67e89). OpenInfer unit tests still 12/12. Ready for your approval. |
|
@greptileai Tip rebased onto latest main. Please re-review. |
|
@kerry-berri Both remaining reds are also failing on current
OpenInfer unit tests are green (12/12). Diff only touches provider registry / catalog / our test file. |
TLDR
Problem this solves:
How it solves it:
openinferas a JSON OpenAI-compatible provideropeninfer/<model>tohttps://api.openinfer.ai/v1User Flow
Before: a developer who wants OpenInfer through LiteLLM has no native provider, so the call never reaches
https://api.openinfer.ai/v1OPENINFER_API_KEYand send POST https://litellm-domain/v1/chat/completions with"model": "openinfer/@oi/Llama-3.2-1B-Instruct"openinferas a providerhttps://api.openinfer.ai/v1/chat/completionsAfter: the same request routes to OpenInfer's chat completions endpoint with the catalog model id and list price
OPENINFER_API_KEYand send POST https://litellm-domain/v1/chat/completions with"model": "openinfer/@oi/Llama-3.2-1B-Instruct"openinfer/prefix and useshttps://api.openinfer.ai/v1"model": "@oi/Llama-3.2-1B-Instruct"Relevant issues
Closes #34357
Replaces #34623, which GitHub closed when
litellm_internal_stagingwas deleted and recreated. The provider code never landed onmainor stagingCompanion docs: BerriAI/litellm-docs#905
Pre-Submission checklist
uv run pytest tests/unit/llms/openai_like/test_openinfer_provider.py -v(12 passed; catalog test no longer pins vendor rates)@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
No
OPENINFER_API_KEYin this environment, so this is routing proof only. Live chat completions against the vendor still need a keyBefore (ed4caeb)
python3 -c 'import json; print("openinfer" in json.load(open("litellm/llms/openai_like/providers.json")))'False.mainalso has noLlmProviders.OPENINFERenumAfter (rebased tip)
python3 - <<'PY' from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider model, provider, api_key, api_base = get_llm_provider( model="openinfer/@oi/Llama-3.2-1B-Instruct", custom_llm_provider=None, api_base=None, api_key="sk-test", ) print(f"model={model}") print(f"provider={provider}") print(f"api_base={api_base}") PYType
New Feature
Caveats (if any)
Medium
litellm-docsmain/v1/chat/completionsproof is not in this descriptionOPENINFER_API_KEYFinal Attestation